package com.bitdf.txing.users.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.bitdf.txing.common.entity.BaseEntity;
import com.bitdf.txing.common.valid.SaveGroup;
import com.lemon.util.anno.MysqlColumn;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 * 
 * 
 * @author Lizhiwei
 * @email 123@qq.com
 * @date 2022-09-05 11:22:36
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tx_ums_user_role")
public class UserRoleEntity extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 等级名
	 */
	@MysqlColumn(comment = "角色名称")
	@NotNull(groups = {SaveGroup.class})
	private String name;
	/**
	 * 是否为默认角色[0->不是；1->是]
	 */
	@MysqlColumn(comment = "是否为默认角色[0->不是；1->是]", defaultValue = "0")
	@TableField("is_default_role")
	@NotNull(groups = {SaveGroup.class})
	private Integer defaultRole;

}
